import http from "@/utils/http";

/**
 * @description: 获取所有地址信息
 * @param {*}
 * @return {*}
 */

export function getaddressAPI(userId){
    return http.get('/select/addr',{params:{userId}});
}
/**
 * @description: 删除指定id地址
 * @param {*}
 * @return {*}
 */

export function delectAdressAPI(addressId){
    return http.get('/address/delete',{params:{addressId}});
}

/**
 * @description: 更新地址信息
 * @param {*}
 * @return {*}
 */
export function upDateAddressAPI(updateAddress) {
    console.log(updateAddress);
    return http.post('/address/update',updateAddress)
}

/**
 * @description: 添加地址信息
 * @param {*}
 * @return {*}
 */
export function addAddressAPI(sku){
    return http.post('/address/add',sku);
}
/**
 * @description: 得到所有城市信息
 * @param {*}
 * @return {*}
 */
export function getReginAPI() {
    return http.get('/select/allRegin')
}
